import React, { useState, useRef } from 'react';
import ProductView from './views/ref/ProductView';
const App = () => {
  // const [users, setUser] = useState({
  //   username: '',
  //   password: ''
  // })
  // const userRef = useRef('username')
  // const pwdRef = useRef('password')

  // const submitHandler = () => {
  //   console.log("submit")
  //   console.log(userRef.current.value)
  //   console.log(pwdRef.current.value)
  //   let username = userRef.current.value;
  //   let password = pwdRef.current.value;
  //   setUser({ username, password })
  // }
  return (
    <div>
      <ProductView />
      {/* <form>
        <div>
          UserName:<input ref={userRef} type='text' defaultValue="wqw" />
        </div>
        <div>
          PassWord:<input ref={pwdRef} type='password' defaultValue="123" />
        </div>
        <div>
          <button type="button" onClick={submitHandler}>submit</button>
        </div>
      </form>
      <div>
        你输入的信息： {users.username} -- {users.password}
      </div> */}
    </div>
  );
}

export default App;
